if (my_money > cost_of_CD) then
buy_CD
else if (see_a_friend) then
borrow_money
else get_a_job
end if;
end if;
Problem solving sequence:
1.Algorithm
2.Pseudo-code
3.Flowchat
4.C/C++ code
Julien is shopping at a mall and he finds a CD that he wants to buy. if Julien doesn't have enough money, before going out to get a job, he could look for a friend to borrow the money from.
Nesting control statement
Example (Step 2)
Now there is one control statement that is inside of another control statement. This is known as nesting.